package com.xy.annotaion.handler.kotlin.pdf

import com.itextpdf.kernel.pdf.PdfDocument
import com.itextpdf.kernel.pdf.PdfWriter
import com.itextpdf.layout.Document
import com.itextpdf.layout.element.Paragraph
import com.xy.annotaion.handler.kotlin.p

fun main() {
    val pdf = PdfDocument(PdfWriter("hello.pdf"))
    val doc = Document(pdf)

    val line = "Hello World,this is 汉字!"
    for (i in 0..10) {
        doc.add(Paragraph(line))
    }
    doc.close()

    p("end: new pdf over")

}